<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>教育考试平台_在线考试</title>
    <link href="/css/examMain.css" rel="stylesheet" type="text/css"/>
    <link href="/css/iconfont.css" rel="stylesheet" type="text/css"/>
    <link href="/css/test.css" rel="stylesheet" type="text/css"/>

    <style>
        .hasBeenAnswer {
            background: #5d9cec;
            color: #fff;
        }
        .addButton {
            padding: 0 10px;
            cursor: pointer;
            float: right;
            height: 24px;
            line-height: 24px;
            background: #389fc3;
            color: #fff;
            border-radius: 30px;
            display: block;
            margin-top: 5px;
        }


    </style>
</head>

<body>
<div class="main">
    <!--nr start-->
    <div class="test_main">
        <div class="nr_left">
            <div class="test" style=" border: 0 solid #fff;    background: #fff;">
                <form action="" method="post">
                    <div class="test_content">
                        <div class="test_content_title">
                            <h2>所有试卷</h2>
                        </div>
                    </div>
                </form>
            </div>

    </div>
    <!--nr end-->
    <div class="foot">
        <div class="test_content_title" style="background: #fff; ">
            <div class="test_content_nr_main">
                <ul id="deleteCategoryId">
                    <li class="option">
                        <label id="bappend">
                            <c:forEach items="${categoryVos.list}" var="category">

                                <a href="/paper/paperDetail?UUID=${category.uuid}">
                                    <p class="ue" style="display: inline;width: 765px; cursor: pointer;">
                                        年级:${category.majorName} / 时间:${category.timeValue}分钟 / 分数:${category.scopeValue}分 / 出题人:${category.author}

                                    </p>
                                </a>
                                <input type="hidden" id="deleteByUUID" value="${category.uuid}">
                                <p id="deleteByCategoryId" style="cursor: pointer;">X</p>
                            </c:forEach>
                        </label>
                    </li>
                    <br>
                    <br>
                    <br>
                    <br>
                    <li class="option">
                        <label >

                                <a target="_blank" href="/page/paper">
                                    <p class="ue" style="display: inline;width: 765px; cursor: pointer;">
                                       添加新试题
                                    </p>
                                </a>


                        </label>
                    </li>


                </ul>
            </div>
        </div>


    </div>
</div>
</div>
<script src="/js/jquery-1.11.3.min.js"></script>
<script src="/js/jquery.easy-pie-chart.js"></script>
<!--时间js-->
<script src="/js/jquery.countdown.js"></script>
<script>
$(function () {
    $("#deleteCategoryId").on('click', '#deleteByCategoryId', function () {

        var uuid = $(this).prevAll("#deleteByUUID").val();
        if (confirm("确认删除？")) {
            // 删除
            $.ajax({
                url:'/category/deleteByUUID?uuid='+uuid,
                success:function (result) {
                    if (result.code ==200) {
                        window.location.reload();
                    } else {
                        alert(result.msg);
                        return false;
                    }
                }
            });
        }

    })
})

</script>


</body>

</html>